import request from '@/utils/request'

// 查询采购发票列表
export function listPinvoice(query) {
  return request({
    url: '/crm/pinvoice/list',
    method: 'get',
    params: query
  })
}

// 查询采购发票详细
export function getPinvoice(id) {
  return request({
    url: '/crm/pinvoice/' + id,
    method: 'get'
  })
}

// 新增采购发票
export function addPinvoice(data) {
  return request({
    url: '/crm/pinvoice',
    method: 'post',
    data: data
  })
}

// 修改采购发票
export function updatePinvoice(data) {
  return request({
    url: '/crm/pinvoice',
    method: 'put',
    data: data
  })
}

// 删除采购发票
export function delPinvoice(id) {
  return request({
    url: '/crm/pinvoice/' + id,
    method: 'delete'
  })
}
